<%@ page language="java" contentType="text/html; charset=utf-8"
	pageEncoding="utf-8"%>
<%@taglib prefix="s" uri="/struts-tags"%>
<!DOCTYPE html>
<html lang="zh">
<head>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<link href="css/bootstrap.css" type="text/css" rel="stylesheet">
<link href="css/application.css" type="text/css" rel="stylesheet">

<title>美味书签</title>
</head>

<body>
	<%@include file="header.jsp"%>
	<!-- 主体部分 -->
	<div class="container">
		<div class="row">
			<!-- 主页的左半面 -->
			<div id="mainbar" class="span10">
				<s:if test="result <= 0  ">
					<div class="alert alert-success">搜索没有结果</div>
				</s:if>
				<div class="myLink">
					<s:if test="myList.size > 0 ">
						<h3>我的链接</h3>
					</s:if>
					<s:iterator value="myList">
						<div class="row">
							<div class="feedUser span0">
								<img width="50" height="50" alt="profile pic"
									src="upload/<s:property value="avatar"/>">
							</div>
							<div class="body span8">
								<div class="feedUser">
									<a href="listhome?userId=<s:property value="user_id"/>"><s:property
											value="username" /></a><small>保存了该链接</small>
								</div>
								<a title=<s:property value="title"/> target="_blank"
									href=<s:property value="url"/>><s:property value="title" /></a>

								<div class="sub">
									<a class="saves"
										href="match?searchUrl=<s:property
												value="url" />"><s:property
											value="saveNum" /> save</a> <span><s:property value="url" /></span>
								</div>

								<blockquote>
									<small><s:property value="description" /> </small>
								</blockquote>
							</div>
							<div class="action pull-right">
								<s:if test="#session.sessionUser != null">
									<s:if test="#session.sessionUser.id == user_id">
										<div>
											<button class="editLink btn" value=<s:property value="id"/>>编辑</button>
										</div>
									</s:if>
									<s:else>
										<button class="editLink btn" value=<s:property value="id"/>>添加</button>
									</s:else>
								</s:if>
								<s:else>
									<div>
										<a class="editLink btn" href="register.jsp">添加</a>
									</div>
								</s:else>
								<div id="ckepop">
									<a target="_blank" class="btn jiathis"
										href="http://www.jiathis.com/share" style="">分享</a>
								</div>
							</div>
						</div>
						<div class="row">
							<div class="taglist span8">
								<s:iterator value="linkTags" id="tagName">
									<button class="btn linkTag">
										<s:property value="tagName" />
									</button>
								</s:iterator>
							</div>
						</div>
						<hr>
					</s:iterator>
				</div>
				<div class="otherLink">
					<s:if test="otherList.size > 0 ">
						<h3>他人链接</h3>
					</s:if>
					<s:iterator value="otherList">
						<div class="row">
							<div class="feedUser span0">
								<img width="50" height="50" alt="profile pic"
									src="upload/<s:property value="avatar"/>">
							</div>
							<div class="body span8">
								<div class="feedUser">
									<a href="listhome?userId=<s:property value="user_id"/>"><s:property
											value="username" /></a><small>保存了该链接</small>
								</div>
								<a title=<s:property value="title"/> target="_blank"
									href=<s:property value="url"/>><s:property value="title" /></a>

								<div class="sub">
									<a class="saves"
										href="match?searchUrl=<s:property
												value="url" />"><s:property
											value="saveNum" /> save</a> <span><s:property value="url" /></span>
								</div>

								<blockquote>
									<small><s:property value="description" /> </small>
								</blockquote>
							</div>
							<div class="action pull-right">
								<s:if test="#session.sessionUser != null">
									<s:if test="#session.sessionUser.id == user_id">
										<div>
											<button class="editLink btn" value=<s:property value="id"/>>编辑</button>
										</div>
									</s:if>
									<s:else>
										<button class="editLink btn" value=<s:property value="id"/>>添加</button>
									</s:else>
								</s:if>
								<s:else>
									<div>
										<a class="editLink btn" href="register.jsp">添加</a>
									</div>
								</s:else>
								<div id="ckepop">
									<a target="_blank" class="btn jiathis"
										href="http://www.jiathis.com/share" style="">分享</a>
								</div>
							</div>
						</div>
						<div class="row">
							<div class="taglist span8">
								<s:iterator value="linkTags" id="tagName">
									<button class="btn linkTag">
										<s:property value="tagName" />
									</button>
								</s:iterator>
							</div>
						</div>
						<hr>
					</s:iterator>
				</div>
			</div>

			<!-- 主页的右半部分 -->
			<div id="sidebar" class="span2">
				<div class=" span2">
					<h3>相关的标签</h3>
					<hr>
					<ul id="tagList" class="unstyled">
						<s:iterator value="tagList">
							<li><button class="btn linkTag">
									<s:property value="tags_name" />
								</button></li>
						</s:iterator>
					</ul>
				</div>
			</div>
		</div>
	</div>

	<script type="text/javascript"
		src="http://v3.jiathis.com/code_mini/jia.js" charset="utf-8"></script>
	<script src="js/jquery-1.7.2.js"></script>
	<script src="js/bootstrap.js"></script>
	<script src="js/jquery.tagsinput.js"></script>
	<script src="js/application.js"></script>
</body>
</html>